<%inherit file="/base/index.html" />
<%namespace file="fields.html" name="fields" import="*"/>

<%def name="heading()">
    <h1 class="main">Editing ${c.title}</h1>
</%def> 
<%def name="js()">
    ${parent.js()}
    ${navfields.js()}

    <script type="text/javascript" src="/yui/2.6.0/element/element-beta-min.js"></script>
    <script type="text/javascript" src="/yui/2.6.0/container/container_core-min.js"></script>
    <script type="text/javascript" src="/yui/2.6.0/editor/simpleeditor-min.js"></script>

    <script type="text/javascript">
    (function() {
        //Setup some private variables
        var Dom = YAHOO.util.Dom,
            Event = YAHOO.util.Event;

            //The SimpleEditor config
            var myConfig = {
                height: '200px',
                width: '630px',
                dompath: true,
                focusAtStart: true,
                handleSubmit: true
            };

        //Now let's load the SimpleEditor..
        var myEditor = new YAHOO.widget.SimpleEditor('editor', myConfig);
        myEditor._defaultToolbar.buttonType = 'advanced';
        document.e = myEditor;
        myEditor._defaultToolbar.titlebar = 'Rich Text Editor';
        myEditor.render();
    })();
    </script>
</%def>
<link rel="stylesheet" type="text/css" href="/yui/2.6.0/assets/skins/sam/skin.css" />

${h.form(h.url_for(controller='page', action='save'))}
   
<fieldset>

<legend>Study</legend>

<label for="heading">Heading:</label><br/>
${h.text(name="heading", id="heading")}<br /><br/>

<label for="title">Title:</label><br/>
${h.text(name="title", id="title")}<br/><br/>

<label for="content">content:</label><br/>
${h.textarea(name="content", id="content")}<br/><br/>


${h.submit(name="action", value="edit")}
<br/><br/>
</fieldset>

${h.end_form()}
